package com.iworkh.spring.spel;

import com.iworkh.spring.spel.bean.entity.Car;
import com.iworkh.spring.spel.bean.entity.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * main类
 *
 * @author: iworkh-沐雨云楼
 * @date: 2019-12-17
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-spel.xml");
        Car carBmw = (Car)context.getBean("car_bmw");
        System.out.println(carBmw);

        Person zhangsan = (Person)context.getBean("zhangsan");
        System.out.println(zhangsan);
    }
}
